﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BattleAtms.Models
{
    //public class FakeGame
    //{
    //    private static FakeGame _me = new FakeGame();


    //    public static IGame GetInstance()
    //    {
    //        return _me;
    //    }


    //    public GameState GetGameState(int userId)
    //    {
    //        return GameState.MyTurn;
    //    }

    //    public ICollection<Ship> GetShips(int userId)
    //    {
    //        var ships = new List<Ship>();
    //        var ship1 = new Ship();
    //        ship1.Decks.Add(new Cell { State = CellState.Filled, X = 0, Y = 0 });
    //        ship1.Decks.Add(new Cell { State = CellState.Filled, X = 0, Y = 1 });
    //        ship1.Decks.Add(new Cell { State = CellState.Filled, X = 0, Y = 2 });

    //        ships.Add(ship1);

    //        var ship2 = new Ship();
    //        ship2.Decks.Add(new Cell { State = CellState.Hit, X = 3, Y = 0 });
    //        ship2.Decks.Add(new Cell { State = CellState.Filled, X = 4, Y = 0 });
    //        ship2.Decks.Add(new Cell { State = CellState.Filled, X = 5, Y = 0 });
    //        ship2.Decks.Add(new Cell { State = CellState.Filled, X = 6, Y = 0 });
    //        ships.Add(ship2);

    //        var ship3 = new Ship();
    //        ship3.Decks.Add(new Cell { State = CellState.Hit, X = 3, Y = 7 });
    //        ship3.Decks.Add(new Cell { State = CellState.Filled, X = 4, Y = 7 });
    //        ship3.Decks.Add(new Cell { State = CellState.Filled, X = 5, Y = 7 });
    //        ships.Add(ship3);
    //        return ships;
    //    }

    //    public ICollection<UserInfo> GetUsers()
    //    {
    //        return new List<UserInfo> { new UserInfo { Id = 1, Name = "Pupkin" } };
    //    }

    //    public int RegisterUser(string name)
    //    {
    //        return 2;
    //    }

    //    public CellState DoTurn(int userId, int x, int y)
    //    {
    //        return CellState.Hit;
    //    }

    //    public void StartGame(int userId, int opponentId)
    //    {
    //    }

    //    public int? GetOpponentId(int userId)
    //    {
    //        return 2;
    //    }

    //    public ICollection<Cell> GetCells(int userId)
    //    {
    //        // TODO
    //        var t=new List<Cell>();
    //        t.Add(new Cell { State = CellState.Filled, X = 0, Y = 0 });
    //        t.Add(new Cell { State = CellState.Opened, X = 1, Y = 1 });
    //        t.Add(new Cell { State = CellState.Hit, X = 2, Y = 2 });
    //        t.Add(new Cell { State = CellState.Dead, X = 3, Y = 3 });
    //        return t;
    //    }
    //}
}